﻿<!--
//*****************************************************************************
//
//  Silver Games - Checkers
//  Copyright © 2009 Randi Relander
//      <rjrelander@users.sourceforge.net>
//
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
//*****************************************************************************
-->

<UserControl x:Class="Checkers.Client.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:Checkers.Client">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="CheckersResources.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Width="640" Height="480">

        <Rectangle x:Name="mBackground" Stroke="#FF40FF00" Width="640" Height="480" StrokeThickness="0" RadiusX="12" RadiusY="12">
            <Rectangle.Fill>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF000000" Offset="0"/>
                    <GradientStop Color="#FF30C000" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>

        <Grid>

            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <c:Board Grid.Row="1" Grid.Column="1" x:Name="mBoard" />

        </Grid>

        <Rectangle x:Name="mBoardMask" Visibility="Collapsed" 
            Width="640" Height="480" Fill="Black" Opacity="0" RadiusX="12" RadiusY="12" />

        <Grid>

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <c:DialogGameMenu Margin="15" Grid.Row="0" Grid.Column="0" x:Name="mGameMenu" />

        </Grid>

        <Grid>

            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <c:DialogPlayAgain Grid.Row="1" Grid.Column="1" x:Name="mPlayAgain" Visibility="Collapsed" />

        </Grid>

        <Grid>

            <Grid.RowDefinitions>
                <RowDefinition Height="10" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="10" />
            </Grid.RowDefinitions>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="15" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="5" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="15" />
            </Grid.ColumnDefinitions>

            <TextBlock Grid.Row="2" Grid.Column="1" x:Name="mProduct" Text="[product]" />
            <TextBlock Grid.Row="2" Grid.Column="3" x:Name="mVersion" Text="[version]" />

            <TextBlock Grid.Row="2" Grid.Column="5" x:Name="mCopyright" Text="[copyright]" />

        </Grid>

        <c:DialogNewGame Grid.Row="1" Grid.Column="1" x:Name="mNewGame" Visibility="Collapsed" />

        <c:DialogTitleScreen Grid.Row="1" Grid.Column="1" x:Name="mTitleScreen" />

        <c:DialogCredits Grid.Row="1" Grid.Column="1" x:Name="mCredits" Visibility="Collapsed" />

    </Grid>
    
</UserControl>
